<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: Twinkle
  Date: 2021/8/30
  Time: 16:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新增</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }

        .container {
            width: 800px;
            height: 600px;
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
            align-items: center;
        }

        .container form {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .container form input, button {
            width: 400px;
            height: 30px;
            padding: 10px;
            margin: 10px;
            font-size: 18px;
        }

        .container form button {
            height: 50px;
        }

        .container div {
            color: red;
        }
    </style>
</head>
<body>
<div class="container">
    <form action="${pageContext.request.contextPath}/saveEmp" method="post">
        <input type="hidden" name="empId" value="${requestScope.emp.empId}">
        姓名:<input type="text" name="empName" value="${requestScope.emp.empName}"/><br/>
        登陆名:<input type="text" name="empLogin" value="${requestScope.emp.empLogin}"/><br/>
        <%if (request.getAttribute("emp") == null) {%>
        密码:<input type="password" name="empPwd" value="${requestScope.emp.empPwd}"/><br/>
        <%} else {%>
        密码:<input readonly type="password" name="empPwd" value="${requestScope.emp.empPwd}"/><br/>
        <%}%>
        入职时间:<input type="text" name="hiredate" value="${requestScope.emp.empHiredate}"/><br/>
        年龄:<input type="text" name="empAge" value="${requestScope.emp.empAge}"/><br/>
        <button type="submit">保存</button>
    </form>
</div>
</body>
</html>
